package com.learning.gwt.server;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.learning.gwt.client.CalcChecker;

/**
 * The server side implementation of the RPC service.
 */
@SuppressWarnings("serial")
public class CalcCheckerImpl extends RemoteServiceServlet implements
		CalcChecker {

	@Override
	public Boolean checkInput(double[] input) throws IllegalArgumentException {
		Boolean rval = false;
		
		double total = input[0];
		double rightSide = input[1];
		
		if (total < 100 && rightSide < 100) {
			rval = true;
		}
		
		return rval;
	}
	
}
